package ratemymacclass

class Professor {

    String firstName
    String lastName
    String department
    String email


    String toString() {
        "$lastName, $firstName "
    }

    static hasMany = [
         profRatings : ProfRating,
         courseRatings : Rating
    ]

    static constraints = {
        firstName()
        lastName()
        department(nullable: true)
        email(nullable: true)
    }
}
